package com.aphrodite.ui.widgets.barcode;

final class BlankModule extends Module {

	/**
	 * Constructs a new BlankModule with the specified width.
	 * 
	 * @param width
	 *            The width of the module in bar widths.
	 */
	BlankModule(int width) {
		super(new int[] { width });
	}

	/**
	 * Draws the module to a barcode output.
	 * 
	 * @param output
	 *            The output to draw to
	 * @param x
	 *            The starting X co-ordinate
	 * @param y
	 *            The starting Y co-ordinate
	 * @param barWidth
	 * @param barHeight
	 * @return The total width drawn
	 */
	int draw(Output output, int x, int y, int barWidth, int barHeight) throws OutputException {
		output.toggleDrawingColor();
		int result = super.draw(output, x, y, barWidth, barHeight);
		output.toggleDrawingColor();
		return result;
	}

	/**
	 * Returns the symbol that this module encodes.
	 * 
	 * @return A blank string
	 */
	String getSymbol() {
		return "";
	}
}
